package com.winit.core.websocket.handler;

import org.springframework.web.socket.*;

/**
 * Created by keel2008 on 16/8/16.
 */
public class TestOnMessageHandler  implements WebSocketHandler {


    @Override
    public void afterConnectionEstablished(WebSocketSession webSocketSession) throws Exception {
        /*for (int i = 0; i < 400; i++){
            TextMessage message = new TextMessage("Echo message num:"+i);
            webSocketSession.sendMessage(message);
        }*/

    }

    @Override
    public void handleMessage(WebSocketSession webSocketSession, WebSocketMessage<?> webSocketMessage) throws Exception {

    }

    @Override
    public void handleTransportError(WebSocketSession webSocketSession, Throwable throwable) throws Exception {

    }

    @Override
    public void afterConnectionClosed(WebSocketSession webSocketSession, CloseStatus closeStatus) throws Exception {

    }

    @Override
    public boolean supportsPartialMessages() {
        return false;
    }
}
